-- GENERATED SPELL FOR [Taerar] --


function spell0_14890(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(24857,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14890', 664, 1)
end

function spell1_14890(pUnit, Event) --@Bellowing Roar,Self--
pUnit:FullCastSpellOnTarget(22686,pUnit)
pUnit:RegisterEvent('Sorts_14890', 5500, 1)
end

function spell2_14890(pUnit, Event) --@Noxious Breath,Self--
pUnit:FullCastSpellOnTarget(24818,pUnit)
pUnit:RegisterEvent('Sorts_14890', 30000, 1)
end

function spell3_14890(pUnit, Event) --@Seeping Fog,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24813,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14890', 1, 1)
end

function spell4_14890(pUnit, Event) --@Seeping Fog,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24814,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14890', 1, 1)
end

function spell5_14890(pUnit, Event) --@Summon Player,n/a--
pUnit:FullCastSpellOnTarget(24776,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14890', 346, 1)
end

function spell6_14890(pUnit, Event) --@Summon Shade of Taerar,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24841,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14890', 1, 1)
end

function spell7_14890(pUnit, Event) --@Summon Shade of Taerar,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24842,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14890', 1, 1)
end

function spell8_14890(pUnit, Event) --@Summon Shade of Taerar,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24843,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14890', 1, 1)
end

function spell9_14890(pUnit, Event) --@Tail Sweep,n/a--
pUnit:FullCastSpellOnTarget(15847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14890', 571, 1)
end

function Sorts_14890(pUnit, Event)
local choix_sorts_14890 = math.random(0, 9)
if choix_sorts_14890 == 0 then
pUnit:RegisterEvent('spell0_14890', 1, 1)
end
if choix_sorts_14890 == 1 then
pUnit:RegisterEvent('spell1_14890', 1, 1)
end
if choix_sorts_14890 == 2 then
pUnit:RegisterEvent('spell2_14890', 1, 1)
end
if choix_sorts_14890 == 3 then
pUnit:RegisterEvent('spell3_14890', 1, 1)
end
if choix_sorts_14890 == 4 then
pUnit:RegisterEvent('spell4_14890', 1, 1)
end
if choix_sorts_14890 == 5 then
pUnit:RegisterEvent('spell5_14890', 1, 1)
end
if choix_sorts_14890 == 6 then
pUnit:RegisterEvent('spell6_14890', 1, 1)
end
if choix_sorts_14890 == 7 then
pUnit:RegisterEvent('spell7_14890', 1, 1)
end
if choix_sorts_14890 == 8 then
pUnit:RegisterEvent('spell8_14890', 1, 1)
end
if choix_sorts_14890 == 9 then
pUnit:RegisterEvent('spell9_14890', 1, 1)
end
end

function mob14890_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14890', math.random(1500, 3000), 1)
end

function mob14890_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14890_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14890_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14890, 1, 'mob14890_Action')
RegisterUnitEvent(14890, 2, 'mob14890_Leave')
RegisterUnitEvent(14890, 3, 'mob14890_Kill')
RegisterUnitEvent(14890, 4, 'mob14890_Die')
